import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

export let children_Router = [
  {
    path: '/main/home',
    name: 'home',
    title:"首页",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/main/home/index.vue'),
  },
  {
    path:"/main/students",
    name:"students",
    title:"学生",
    component: () => import(/* webpackChunkName: "about" */ '../views/main/students/index.vue'),
    children:[
      {
        path: '/main/students/jiang',
        name:"jiang",
        title:"姜国庆",
        component:()=>import(/* webpackChunkName: "about" */ '../views/main/students/Three/Jiang.vue')
      },
      {
        path: '/main/students/Li',
        name:"Li",
        title:"李洋",
        component:()=>import(/* webpackChunkName: "about" */ '../views/main/students/Three/Li.vue')
      },
      {
        path: '/main/students/Wang',
        name:"Wang",
        title:"汪昂",

        component:()=>import(/* webpackChunkName: "about" */ '../views/main/students/Three/Wang.vue')
      },
      {
        path: '/main/students/Zhao',
        name:"Zhao",
        title:"赵晓敏",
        _id:"6",
        menuType:"1",
        component:()=>import(/* webpackChunkName: "about" */ '../views/main/students/Three/Zhao.vue')
      },
      {
        path: '/main/students/Zhu',
        name:"Zhu",
        title:"朱兴圆",

        component:()=>import(/* webpackChunkName: "about" */ '../views/main/students/Three/Zhu.vue')
      }
    ]
  }
]

const routes = [
  {
    path: '/login',
    name: 'login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/login/index.vue')
  },
  {
    path: '/main',
    name: 'main',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/main/index.vue'),
    children:children_Router
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
